<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Slot</title>
    <script src="../Vue.js" type="text/javascript"></script>
</head>
<body>

    <div id="app">
        <timer>{{name}}</timer>
    </div>

    <script>
        let timer = Vue.component('timer', {
                data: function () {
                    return {count:0}
                },
                template:'<div>' +
                    '<h3>You have checked me in {{count}} times</h3>' +
                    '<strong>error!</strong>' +
                    '<slot></slot>' +
                    '</div>'
            }
        )
        let app = new Vue({
            el:"#app",
            data:{
            	name:"我来试试这个串儿"
            }
        })
    </script>
</body>
</html>